package name;

import java.io.DataOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.io.OutputStream;

public class SeverceTHread extends  Thread{
    private Socket socket;
    public SeverceTHread (Socket socket){
        this.socket=socket;
    }

    @Override
    public void run() {
        try {
             OutputStream outputStream = socket.getOutputStream();
             PrintStream pr = new PrintStream(outputStream);
            pr.println("HTTP/1.1 200 OK");
            pr.println("Content-Type:text/htal;charset:UTF-8");
            pr.println();
            pr.println("<html><body><h1>你好，世界！</h1></body></html>");
             pr.close();
             socket.close();


        } catch (Exception e) {

        }
    }
}
